﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity;
using Entities;

namespace DAL
{
    class QuestionSurVeyContext:DbContext
    {
        public DbSet<QuestionSurVey> QuestionsSurVey { get; set; }
        public QuestionSurVeyContext()
            : base("Nhom15")
        {

        }
        #region phan nay chua can
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
           

            modelBuilder.Entity<QuestionSurVey>().ToTable("CauHoiKhaoSat");
            modelBuilder.Entity<QuestionSurVey>().HasKey(x => x.ID);
            modelBuilder.Entity<QuestionSurVey>()
               .Property(x => x.ID)
               .HasColumnName("ID");

            modelBuilder.Entity<QuestionSurVey>()
                .Property(x => x.MieuTa)
                .HasColumnName("MieuTa");


        }
        #endregion
    }
}
